package com.jxpanda.spring.module.wechat.component.message.pojo.general;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.jxpanda.spring.module.wechat.component.message.pojo.MsgType;
import com.jxpanda.spring.module.wechat.component.message.pojo.WechatMessage;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;

/**
 * Markdown消息类
 */
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
@Data
public class WechatMarkdownMessage extends WechatMessage {
    @JsonProperty("markdown")
    private Markdown markdown;

    @Override
    public String getMsgType() {
        return MsgType.MARKDOWN.getValue();
    }

    @Data
    public static class Markdown {
        /**
         * Markdown格式的消息内容
         */
        @JsonProperty("content")
        private String content;
    }
}
